﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using QxFramework.Utilities;
using QxFramework.Core;

public class Slime : EntityBase
{
    public string _currentState;
    public void Start()
    {
        base.Init("Slime");
    }
    public override void Update()
    {
        base.Update();
        GetTarget();
        UpdateAllSkills();
        _currentState = currentState.ToString();
    }
    public override void Die()
    {
        MessageManager.Instance.Get<LevelEvent>().DispatchMessage(LevelEvent.EnemyDie, this);
        Destroy(gameObject);
    }
    public void PlaySlimeAttackEffect()
    {
        EffectManager.Instance.InstantiateSkillEffect("SlimeAttack", EffectManager.Instance.transform.GetChild(0), this.transform.position, skillList[Skills.SlimeAttack]);
    }
    public void ResetState()
    {
        ChangeState(States.StandState);
    }
    
}
